#include <stdio.h>
#include <stdarg.h>
#include <tchar.h>

#ifdef WIN32
#include <windows.h>
#endif

#ifdef WIN32
	#define LOG_MSG(Buffer) OutputDebugString(Buffer);
#else
	#define LOG_MSG(Buffer) 
#endif

class LogHelper {
private :
	_TCHAR m_logBuffer[200];
public :
	void writeLog(_TCHAR* a_szLogMsg, ...) {
		memset(m_logBuffer, 0, sizeof(m_logBuffer));
		va_list vlArgs;
		va_start(vlArgs, a_szLogMsg);
		_vstprintf(m_logBuffer, sizeof(m_logBuffer), a_szLogMsg, vlArgs);
		va_end(vlArgs);

		LOG_MSG(m_logBuffer);
		LOG_MSG(_T("\n"));
	}
};